<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function f() {
        console.log("Hello! f");
      }
      function h() {
        console.log("Hello! h");
      }
      // const f = new Function();
      Function.prototype.defer = function (s) {
        setTimeout(() => this(), s);
      };
      f.defer(2000); // 1 秒后显示 "Hello!"
      h.defer(2000); // 1 秒后显示 "Hello!"
    </script>
  </body>
</html>
